<template>
	<view class="myclient">
		<view class="box1">
			<uni-nav-bar left-icon="left" fixed class="custom-nav-bar" title="我的客户" :status-bar="true"
				:background-color="scrollDistance>50?'#fff':'#00000000'" color="#000" :border='false'>
			</uni-nav-bar>
			<view class="">
				<view class="">
					<view class="">
						4234
					</view>
					<view>
						团队 (人)
					</view>
				</view>
				<view class="">

				</view>
				<view class="">
					<view class="">
						234
					</view>
					<view class="">
						领导力
					</view>
				</view>
			</view>
		</view>
		<view class="box2">
			<view class="">
				<view class="">
					
				</view>
				<text>
					我的直推客户 (10人)
				</text>
			</view>
			<view class="list">
				<view class="" v-for="item in 10">
					<view class="">
						<image src="/static/logo.png" mode=""></image>
						<view class="">
							<view class="">
								李四
							</view>
							<text>
								1589664545
							</text>
						</view>
					</view>
					<view class="">
						<view class="">
							<view class="">
								新手任务
							</view>
							<text>
								任务进度
							</text>
						</view>
						<view class="">
							<view class="">
								60
							</view>
							<text>
								团队 (人)
							</text>
						</view>
						<view class="">
							<view class="">
								已绑定
							</view>
							<text>
								橱窗绑定
							</text>
						</view>
					</view>
					<view class="expert">
						达人lv1
					</view>
				</view>
			</view>
			<view class="null" v-if="0">
				<image :src="imageUrl+ 'null1.png'" mode=""></image>
				<text>暂无客户</text>
			</view>
		</view>
	</view>
</template>

<script setup>
	import { ref, getCurrentInstance } from 'vue';
	import { onPageScroll } from '@dcloudio/uni-app';
	const scrollDistance = ref(0);
	const { appContext } = getCurrentInstance();
	const imageUrl = appContext.config.globalProperties.$imageUrl
	onPageScroll((e) => {
	    scrollDistance.value = e.scrollTop;
	});
</script>

<style lang="scss" scoped>
	.myclient {
		min-height: 100vh;
		background: rgb(246, 247, 248);
		.box1 {
			width: 100%;
			background-image: url('http://mdomall.oss-cn-hangzhou.aliyuncs.com/static/bg5.png');
			background-repeat: no-repeat;
			background-size: 100% 100%;
			padding:0 32rpx;
			padding-bottom: 30rpx;
			box-sizing: border-box;
			>view:nth-child(2){
				display: flex;
				align-items:center;
				justify-content:space-evenly;
				border-radius: 24rpx;
				background: #ffffff42;
				box-shadow: 0px 2px 4px  #d2e3ff80;
				backdrop-filter: blur(6px);
				padding: 36rpx;
				box-sizing: border-box;
				margin-top: 30rpx;
				>view:nth-child(1){
					display: flex;
					flex-direction: column;
					align-items: center;
					>view:nth-child(1){
						font-size: 48rpx;
						font-weight: 700;
						color: #000;
					}
					>view:nth-child(2){
						font-size: 26rpx;
						color: rgba(126, 126, 126, 1);
					}
				}
				>view:nth-child(2){
					width: 1px;
					height: 60rpx;
					background-color: rgba(220, 234, 252, 1);;
				}
				>view:nth-child(3){
					display: flex;
					flex-direction: column;
					align-items: center;
					>view:nth-child(1){
						font-size: 48rpx;
						font-weight: 700;
						color: #000;
					}
					>view:nth-child(2){
						font-size: 26rpx;
						color: rgba(126, 126, 126, 1);
					}
				}
			}
		}
		.box2{
			padding: 0 32rpx;
			padding-top: 20rpx;
			>view:nth-child(1){
				display: flex;
				align-items:center;
				margin-bottom: 28rpx;
				>view{
					width: 6rpx;
					height: 30rpx;
					border-radius: 5rpx;
					background: rgba(110, 170, 255, 1);
					margin-right: 16rpx;
				}
				text{
					font-size: 28rpx;
					font-weight: 500;
				}
			}
			.list{
				>view{
					padding: 32rpx;
					box-sizing: border-box;
					border-radius: 20rpx;
					background: rgba(255, 255, 255, 1);
					position: relative;
					margin-bottom: 28rpx;
					>view:nth-child(1){
						display: flex;
						align-items:center;
						margin-bottom: 36rpx;
						image{
							width:98rpx;
							height: 98rpx;
							border-radius:50%;
							margin-right: 24rpx;
						}
					}
					>view:nth-child(2){
						display: flex;
						justify-content:space-around;
						>view{
							display: flex;
							flex-direction: column;
							align-items: center;
							>view{
								font-size: 30rpx;
								font-weight: 500;
								margin-bottom: 12rpx;
							}
							>text{
								font-size: 26rpx;
								color: rgba(106, 106, 106, 1);
							}
						}
						>view:nth-child(3){
							>view{
								font-size: 30rpx;
								font-weight: 500;
								color: rgba(42, 130, 228, 1);
							}
						}
					}
					.expert{
						position:absolute;
						right: 0;
						top: 0;
						opacity: 1;
						border-radius: 0px 20px, 0px, 20px;
						background: linear-gradient(90deg, rgba(240, 246, 255, 1) 0%, rgba(240, 246, 255, 0) 100%);
						font-size: 30rpx;
						font-weight: 400;
						color: rgba(85, 96, 107, 1);
						padding: 12rpx 30rpx;
						border-bottom-left-radius: 20rpx;
					}
				}
			}
			.null{
				display: flex;
				align-items: center;
				flex-direction: column;
				padding-top: 100rpx;
				image{
					width: 172rpx;
					height: 172rpx;
				}
				text{
					font-size: 36rpx;
					font-weight: 500;
					color: rgba(106, 106, 106, 1);
				}
			}
		}
	}
</style>